// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.asm.analysis;

import org.objectweb.asm.tree.analysis.Analyzer;
import org.objectweb.asm.tree.analysis.Interpreter;

/**
 * Provides static methods dealing with {@code Analyzer}s.
 * 
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class Analyzers {
  /**
   * Creates new instance of {@code Analyzer} using given bytecode interpreter.
   *  
   * @param interpreter bytecode interpreter
   * @return analyzer
   */
  public static Analyzer newUsing(Interpreter interpreter) {
    // TODO(micapolos): Revert back to standard Analyzer as soon 
    // as DUP instruction bug is fixed in ASM 3.2
    return new FixedAnalyzer(interpreter);
  }
}
